<!doctype html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>订单中心</title>
    <link rel="stylesheet" type="text/css" th:href="@{user_center/css/identify.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{user_center/css/layout.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{user_center/css/account.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{user_center/css/style.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{user_center/css/control_index.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{css/timeTo.css}" />
    <script type="text/javascript" th:src="@{user_center/js/jquery-1.7.2.min.js}"></script>
    <script type="text/javascript" th:src="@{user_center/js/layer/layer.js}"></script>
    <script type="text/javascript" th:src="@{user_center/js/haidao.offcial.general.js}"></script>
    <script type="text/javascript" th:src="@{user_center/js/select.js}"></script>
    <script type="text/javascript" th:src="@{user_center/js/haidao.validate.js}"></script>
    <script type="text/javascript" th:src="@{js/jquery.time-to.min.js}"></script>
</head>

<body>
<div th:replace="common/common::#lefttop"></div>

<div class="view-body">

    <div th:replace="common/common::#left"></div>

    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">我的订单</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix" th:if="${!lists.isEmpty()}">
                <div class="tr-th clearfix">
                    <div class="th w5 text-center"><!--<input class="margin-top-15" type="checkbox" />--></div>
                    <div class="th w15">订单号</div>
                    <div class="th w10">下单用户</div>
                    <div class="th w10">总金额</div>
                    <div class="th w20">收货地址</div>
                    <div class="th w10">支付状态</div>
                    <div class="th w10">创建时间</div>
                    <div class="th w10">订单状态</div>
                    <div class="th w10 text-center">操作</div>
                </div>


                <div class="tr-th clearfix" th:each="list:${lists}">
                    <div class="th w5 text-center"><!--<input class="margin-top-15" type="checkbox" />--></div>
                    <div class="th w15">[[${list.orderid}]]</div>
                    <div class="th w10">[[${list.account}]]</div>
                    <div class="th w10">[[${list.price}]]</div>
                    <div class="th w20">[[${list.address}]]</div>
                    <div class="th w10" th:if="${list.paymentstatus}==0">
                        未支付
                    </div>
                    <div class="th w10" th:if="${list.paymentstatus}==1">
                        已支付
                    </div>
                    <div class="th w10">[[${list.creationtime}]]</div>
                    <div class="th w10" th:if="${list.getOrderStatus()==1}"><a th:href="@{'/findOrderByCid.do?oid='+${list.orderid}}">查看订单详情</a></div>
                    <div class="th w10" th:if="${list.getOrderStatus()==0}">已过期</div>
                    <div class="th w10" th:if="${list.getOrderStatus()==2}">厨师已受理</div>
                    <div class="th w10" th:if="${list.getOrderStatus()==3}">厨师已拒绝</div>
                    <div class="th w10 text-center" th:if="${list.getOrderStatus()!=0}and ${list.paymentstatus!=1}"><a th:href="@{'/deleteOrder?oid='+${list.orderid}}">删除&nbsp</a>
                        <a th:href="@{'/user_pay.html?orderid='+${list.orderid}}">&nbsp去支付</a></div>
                    <div class="th w10 text-center" th:if="${list.getOrderStatus()==0} and ${list.paymentstatus!=1}">已过期</div>
                    <div class="th w10 text-center" th:if="${list.getOrderStatus()!=1} and ${list.paymentstatus==1}">订单已完成</div>
                </div>

            </div>


            <div class="tr non-info show border-bottom-none" th:if="${lists.isEmpty()}">
                <span>你还没有订单，去下单吧！</span>
            </div>
        </div>
    </div>
    <div class="show-page padding-big-right hidden">
        <div class="page">
        </div>
    </div>
</div>
</div>

<script>
    $(".sidebar-title").live('click', function () {
        if ($(this).parent(".sidebar-nav").hasClass("sidebar-nav-fold")) {
            $(this).next().slideDown(200);
            $(this).parent(".sidebar-nav").removeClass("sidebar-nav-fold");
        } else {
            $(this).next().slideUp(200);
            $(this).parent(".sidebar-nav").addClass("sidebar-nav-fold");
        }
    });
     $('.timechange').timeTo({
        seconds: 100,
        displayHours: false
    });

</script>
</body>

</html>
